class ServicesList():
    services = {}
    @staticmethod
    def getList():
        return ServicesList.services.items()

    @staticmethod
    def size():
        return len(ServicesList.services.keys)

    @staticmethod
    def hasService(service):
        if hasattr(service, "getServiceId") and callable(service.getServiceId): 
            return service.getServiceId() in ServicesList.services
        else:
            raise TypeError("Service must have getServiceId")
            return false

    @staticmethod
    def add(service):
        if ServicesList.hasService(service) == 0:
            ServicesList.services[service.getServiceId()] = service
            print service.getServiceId()

    @staticmethod
    def remove(service):
        if ServicesList.hasService(service) == 1:
            ServicesList.services.pop(service.getServiceId())

    @staticmethod
    def getService(serviceName):
        if serviceName in nameServicesList.services:
            return ServicesList.services[serviceName]
        return None